package boddaert.philippe.cashGame.comparator;

import java.util.ArrayList;
import java.util.List;

import boddaert.philippe.cashGame.Game;

public class GameAnalysisReport {

	private List<GameAnalysis> analysis = new ArrayList<GameAnalysis>();
	private final Game game;

	public GameAnalysisReport(Game game) {
		this.game = game;
	}

	public GameAnalysis getBestRatio() {
		GameAnalysis minimumAnalysis = analysis.get(0);

		for (GameAnalysis analyse : analysis) {
			if (analyse.getRatio() >= minimumAnalysis.getRatio())
				minimumAnalysis = analyse;
		}
		return minimumAnalysis;
	}

	public void addAnalysis(GameAnalysis gameAnalysis) {
		this.analysis.add(gameAnalysis);
	}

	public int getNumberAnalysis() {
		return analysis.size();
	}

	public Game getGame() {
		return this.game;
	}

}
